
lamp_box = {
	type = "wallmounted",
	wall_top = {-0.3275,0.375,-0.3275,0.3275,0.5,0.3275},
	wall_bottom = {-0.3275,-0.5,-0.3275,0.3275,-0.375,0.3275},
	wall_side = {-0.375,-0.3275,-0.3275,-0.5,0.3275,0.3275},
}



--fixme: rename node
--group: inside
minetest.register_node("morelights:wall_lamp", {

	    drawtype = "mesh",
	    mesh = "morelights_wall_lamp.obj",
	    tiles = {"morelights_wall_lamp.png"},
	    groups = {cracky=3},
	    paramtype = "light",
	    paramtype2 = "wallmounted",
	    description = "Wall / Ceiling Lamp",
	    selection_box = lamp_box,
	    walkable = false,
	    light_source = 15
})


--group: garden
minetest.register_node("morelights:sphere_lamp_standing", {

	    drawtype = "mesh",
	    mesh = "morelights_sphere_lamp_standing.obj",
	    tiles = {"morelights_sphere_lamp_standing.png"},
	    groups = {cracky=3},
	    paramtype = "light",
	    description = "Sphere Lamp",
	    use_texture_alpha = true,
	    selection_box = {
            type = "fixed",
            fixed = {-0.1200,-0.5,-0.1200,0.1200,0.185,0.1200},
	    },
	    walkable = false,
	    light_source = 12,
	    on_place = minetest.rotate_node
})


minetest.register_node("morelights:sphere_lamp_standing_tall", {

	    drawtype = "mesh",
	    mesh = "morelights_sphere_lamp_standing2.obj",
	    tiles = {"morelights_sphere_lamp_standing.png"},
	    groups = {cracky=3},
	    paramtype = "light",
	    description = "Tall Sphere Lamp",
	    use_texture_alpha = true,
        selection_box = {
            type = "fixed",
            fixed = {-0.1200,-0.5,-0.1200,0.1200,0.660,0.1200},
	    },
	    walkable = false,
	    light_source = 12,
	    on_place = minetest.rotate_node

})


minetest.register_node("morelights:sphere_lamp_wall", {

        description = "Sphere Lamp (On)",
	    drawtype = "mesh",
	    mesh = "morelights_sphere_lamp_wall.obj",
	    tiles = {"morelights_sphere_lamp_standing.png"},
	    use_texture_alpha = true,
	    groups = {cracky=3},
	    paramtype = "light",
	    paramtype2 = "facedir",

        selection_box = {
            type = "fixed",
            fixed = {-0.17,-0.26,-0.08,0.17,0.4,0.5},
	    },
	    walkable = false,
	    light_source = 12
})


minetest.register_node("morelights:garden_lamp_on", {

        description = "Garden Lamp",
	    drawtype = "mesh",
	    mesh = "morelights_garden_lamp.obj",
	    tiles = {"morelights_garden_lamp.png"},
	    groups = {cracky=3},
	    paramtype = "light",
	    paramtype2 = "facedir",
	    walkable = false,
        selection_box = {
            type = "fixed",
            fixed = {-0.1500,-0.5,-0.1500,0.1500,-0.1,0.1500},
	    },
	    light_source = 12

})


minetest.register_node("morelights:leaf_lamp", {
        description = "Leaf Lamp",
        tiles = { "morelights_leaf_lamp.png" },
        paramtype = "light",
	    groups = {cracky=3},
		light_source = 9
		})

minetest.register_node("morelights:window_light", {
        description = "Window Light",
        tiles = { "morelights_window_light.png" },
        paramtype = "light",
	    groups = {cracky=3},
		light_source = 14
		})

minetest.register_node("morelights:stone_light", {
        description = "Stone Light",
        tiles = { "morelights_stone_light.png" },
        paramtype = "light",
	    groups = {cracky=3},
		light_source = 11
		})

minetest.register_node("morelights:mese_stone_1", {
        description = "Mese-stone Light",
        tiles = { "morelights_mese_stone_1.png" },
        paramtype = "light",
	    groups = {cracky=3},
		light_source = 11
		})

minetest.register_node("morelights:mese_stone_2", {
        description = "Mese-stone Light",
        tiles = { "morelights_mese_stone_2.png" },
        paramtype = "light",
	    groups = {cracky=3},
		light_source = 11
		})

minetest.register_node("morelights:mese_desert_stone_1", {
        description = "Mese-stone Light",
        tiles = { "morelights_mese_desert_stone_1.png" },
        paramtype = "light",
	    groups = {cracky=3},
		light_source = 11
		})

minetest.register_node("morelights:mese_desert_stone_2", {
        description = "Mese-stone Light",
        tiles = { "morelights_mese_desert_stone_2.png" },
        paramtype = "light",
	    groups = {cracky=3},
		light_source = 11
		})

minetest.register_node("morelights:mese_sand_stone_1", {
        description = "Mese-stone Light",
        tiles = { "morelights_mese_sand_stone_1.png" },
        paramtype = "light",
	    groups = {cracky=3},
		light_source = 11
		})

minetest.register_node("morelights:mese_sand_stone_2", {
        description = "Mese-stone Light",
        tiles = { "morelights_mese_sand_stone_2.png" },
        paramtype = "light",
	    groups = {cracky=3},
		light_source = 11
		})
